exports.deductDkp = function (req, res) {

  var bodyParams = req.routeInfo.bodyParams;

  console.log(bodyParams);

  var nowTime = Date.parse(new Date(bodyParams.nowDate)) / 1000;

  //新增记录
  db.add({

    "ir_type": 1,
    "ir_number": bodyParams.dkpValue,
    "ir_equipment_name": bodyParams.equipmentName,
    "ir_mid": bodyParams.mId,
    "ir_create_time": nowTime

  }, "dkp_integral_record", function (rs) {


    //更新相应人员DKP
    db.where({ m_id: bodyParams.mId, }).updateNumDec("m_integral", bodyParams.dkpValue, "dkp_member", function (resp) {

      RES.successResponse(res);

    });
  })


}